all:
	swig -python -outdir ./ ../octopus.i
	gcc -fPIC -c ../../liboctopus/src/octopus.c
	gcc -fPIC -c ../octopus_wrap.c -I /usr/include/python2.4
	gcc -fPIC -shared octopus_wrap.o octopus.o /usr/lib/libusb.so -o _octopus.so

win:
	gcc -fPIC -c ../../liboctopus/src/octopus.c -I /c/Programme/libusb-win32-device-bin-0.1.10.1/include
	gcc -fPIC -c octopus_wrap.c -I /c/Python25/libs -lpython25 -I/c/Python25/include -I /c/Programme/libusb-win32-device-bin-0.1.10.1/include
	gcc -fPIC -shared *.o -o _octopus.pyd -L/c/Python25/libs -lpython25 -lusb -L/c/Programme/libusb-win32-device-bin-0.1.10.1/lib/gcc


install:
	cp _octopus.so /usr/local/lib/python2.4/site-packages/
	cp octopus.py /usr/local/lib/python2.4/site-packages/
